package com.hbnu.collection;

import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author kittychen
 * @since 2025-10-17 9:28
 */
public class CollectionsDemo {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();

        list.add("element1");
        list.add("element2");
        list.add("element3");

        Collections.addAll(list, "element4", "element5", "element6");
        System.out.println(list);

        Collections.reverse(list);
        System.out.println(list);

        Collections.shuffle(list);
        System.out.println(list);

        Collections.sort(list);
        System.out.println(list);
    }
}
